-
Notifications
You must be signed in to change notification settings - Fork 16.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move disabling of rc overrides up to RC_Channel base class #9275
Move disabling of rc overrides up to RC_Channel base class #9275
Conversation
This will stop situations like we currently have where the MANUAL_CONTROL GCS mavlink packets can still affect the vehicle Also resolves an issue where has_new_overrides may not be set appropriately
This shouldn't really in in RC_Channels - when we move the mavlink packet handling up to the GCS_MAVLink base class we should move this into there.
Use RC_Channels::has_active_overrides() instead
cf2e706
to
2a0f7bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the autotest comment, LGTM!
want_speed = 2.0 | ||
print("Speed=%f want=<%f" % (m.groundspeed, want_speed)) | ||
if m.groundspeed < want_speed: | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't it make more sense to compare the actual PWM value like was done before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subsequent test is checking the vehicle's speed, so this is consistent.
return; | ||
} | ||
|
||
// Nobody ever talks to us. Log an error and enter failsafe. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want more of these comments in our code! 🤣
This allows rc overrides to be disabled on a Rover with an aux switch (as they can on Copter).